<%@include file="/pages/common/taglib.jsp"  %>
<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<head>
<title>WEB ENTERPRISE FRAMEWORK</title>
		<%@include file="/styles/css_lib.jsp"%>
		<%@include file="/scripts/widgets/sdmenu/css_lib.jsp"%>
		
		<%@include file="/pages/common/js_global.jsp"%>
		<%@include file="/scripts/sdk/js_lib.jsp"%>
		<%@include file="/scripts/config/js_lib.jsp"%>
		<%@include file="/scripts/utils/js_lib.jsp"%>
		<%@include file="/scripts/i18n/js_lib.jsp"%>
		<%@include file="/scripts/widgets/sdmenu/js_lib.jsp"%>

<script type="text/javascript">
$(window).bind('resize',function(){
	contour();
});
$(window).ready(function(){
	hiddenModel();
	hiddenBanner();
	openWelcomePage();
});

function openWelcomePage(){
	TabTagUtils.newTab('viewWelcome',i18n.msg.welcome,'${ctx}/pages/common/welcome.jsp', false);
}

/**
 * 隐基藏左侧菜单栏方法
 */
function hiddenModel(){
	var toggleDivtoLeft = $("#toggleDivtoLeft");
	var toggleDivtoRight = $("#toggleDivtoRight");
	var ModuleToggle = $("#ModuleToggle");
	var ModuleRightBox = $("#ModuleRightBox");
	var ModelLeft = $("#ModuleLeft");
	var ModelRight = $("#ModuleRight");
	toggleDivtoRight.hide();
	toggleDivtoLeft.click(function(){
		ModelLeft.hide();
		toggleDivtoLeft.hide();
		toggleDivtoRight.show();		
		contour('left');
	});
	toggleDivtoRight.click(function(){
		ModelLeft.show();
		toggleDivtoRight.hide();
		toggleDivtoLeft.show();		
		contour('right');
	});
}

/**
 * 隐藏最上层Banner栏方法
 */
function hiddenBanner(){
	var toggleDivtoUp = $("#toggleDivtoUp");
	var toggleDivtoDown = $("#toggleDivtoDown");
	var ModelLeft = $("#ModuleLeft");
	var ModelRight = $("#ModuleRight");
	var ModuleRightBox = $("#ModuleRightBox");
	var topBannerDiv = $("#Top");
	var contentDiv = $("#Content");
	toggleDivtoUp.click(function(){
		topBannerDiv.hide();
		contentDiv.css("height","90%");
		ModelLeft.css("height","100%");
		ModuleRightBox.css("height","97%");
		ModelRight.css("height","98%");
		toggleDivtoUp.hide();
		toggleDivtoDown.show();
		contour('top');
	});
	toggleDivtoDown.click(function(){
		topBannerDiv.show();
		contentDiv.css("height","80%");
		ModelLeft.css("height","100%");
		ModuleRightBox.css("height","95%");
		ModelRight.css("height","97%");
		toggleDivtoDown.hide();
		toggleDivtoUp.show();
		contour('down');
	});
}

function initSubModel(){
	LoginService.getSubModelStatus(function(status){
		var oModuleLeft = $("#ModuleLeft")[0];
		if(status=='close'){
			oModuleLeft.style.border = "0px solid #EFEFEF";
			oModuleLeft.style.width = "0px";
			
		} else {
			oModuleLeft.style.border = "5px solid #EFEFEF";
			oModuleLeft.style.width = "190px";
		}
	});
}
function toggleSubModel(){
	LoginService.getSubModelStatus(function(status){
		var oModuleLeft = $("#ModuleLeft");
		var oModuleToggle = $("#ModuleToggle");
		if(status=='close'){
			oModuleLeft.animate({
				width : '190px'
			}, "fast", function() {
				oModuleLeft[0].style.width = '190px';
				oModuleLeft[0].style.overflow = "";
			});
			oModuleLeft[0].style.border = "5px solid #EFEFEF";
			LoginService.setSubModelStatus('open');
			document.getElementById("ModuleRight").className="ModuleRight";
		} else {
			oModuleLeft.animate({
				width : '0px'
			}, "fast", function() {
				oModuleLeft[0].style.width = '0px';
				oModuleLeft[0].style.border = "0px solid #EFEFEF";
				oModuleLeft[0].style.overflow = "hidden";
			});	
			LoginService.setSubModelStatus('close');
			document.getElementById("ModuleRight").className="ModuleRightAll";
		}
	});
}
</script>
</head>
<body style="overflow: hidden;">
	<div id="Code">
		<%@include file="/pages/common/banner.jsp"%>
		<!--Content-->
		<div id="IndexContent">
			<!--Left-->
			<%@include file="/pages/common/submodel.jsp"%>
			<!--Left-->
			<!--Right-->
			<div class="ModuleRightBox" id="ModuleRightBox">
				<div class="ModuleRight" id="ModuleRight">
					<!-- TAB BEGIN -->
					<div class="tab ui-widget-content" id="divTab"></div>
					<div class="tab-line ui-state-active" id="divTabLine"></div>
					<div class="tab-content ui-widget-content" id="divFrame"></div>
					<!-- TAB END -->
				</div>
			</div>
			<!--Right-->
		</div>
		<!--Content-->
		<%@include file="/pages/common/bottom.jsp"%>
	</div>
</body>
</html>
<!-- test4 5 -->